package cn.chen.sparkproject.dao.impl;

import cn.chen.sparkproject.dao.ITop10CategoryDao;
import cn.chen.sparkproject.domain.Top10Category;
import cn.chen.sparkproject.jdbc.JdbcHelper;

public class Top10CategoryDaoImpl implements ITop10CategoryDao{

    @Override
    public void insert(Top10Category category) {

        String sql = "insert into top10_category values(?,?,?,?,?)";
        Object[] params = new Object[]{
                category.getTaskid(),
                category.getCategoryid(),
                category.getClickCount(),
                category.getOrderCount(),
                category.getPayCount()
        };

        JdbcHelper jdbcHelper = JdbcHelper.getInstance();
        jdbcHelper.executeUpdate(sql, params);
    }

}
